package net.messagenet.mazor.web.mngbeans;


import java.io.Serializable;

import javax.annotation.PostConstruct;
import javax.naming.InitialContext;
import javax.naming.NamingException;

import net.messagenet.mazor.ejb.facade.MZRFacadeLocal;
import net.messagenet.mazor.exception.MZRApplicativeException;
import net.messagenet.mazor.exception.MZRInternalServerException;
import net.messagenet.mazor.infra.cache.UserCacheManager;

import org.apache.log4j.Logger;


public class HelpManagedBean implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -5388230760485952510L;
	
	
	

	//	private UserCacheManager cacheManager;
	private MZRFacadeLocal facade=null;
	

	private Logger logger = Logger.getLogger(this.getClass());

	private String help;
	
	@PostConstruct
	public void init() throws MZRInternalServerException, MZRApplicativeException {
		
		InitialContext ic;
			
		try {
				ic = new InitialContext();
				facade = (MZRFacadeLocal) ic.lookup("MZRFacade/local");
			} catch (NamingException e) {
				logger.error(e.getMessage(),e);
			}

			UserCacheManager cacheManager = facade.getUserCacheManager();
			help= cacheManager.getHelpFile();
	}
	public String getHelp(){
		return help;
	}

}

